<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<script src="./jquery/jquery-1.12.4.min.js"></script>
<style>
    .wrap {
        width: 100px;
        height: 100px;
        background-color: red;
    }
</style>

<body>
    <!-- 把wrap中的inner删掉 -->
    <div class="wrap">
        <div class="inner">4865</div>
    </div>
    <script>
        // 删除所有匹配元素的子元素
        // $('.wrap').empty();

        // 删除所有匹配的元素
        $('.wrap').remove()
        console.log($('.wrap'));
    </script>
</body>

</html>